package com.lys.cmsservice.service.impl;

import com.lys.cmsservice.entity.CrmBanner;
import com.lys.cmsservice.mapper.CrmBannerMapper;
import com.lys.cmsservice.service.CrmBannerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 首页banner表 服务实现类
 * </p>
 *
 * @author Lyyyys
 * @since 2021-06-13
 */
@Service
public class CrmBannerServiceImpl extends ServiceImpl<CrmBannerMapper, CrmBanner> implements CrmBannerService {

    @Autowired
    private CrmBannerMapper bannerMapper;

    @Cacheable(key="'selectIndexList'" , value = "banner")
    @Override
    public List<CrmBanner> selectIndexList() {
        List<CrmBanner> list = bannerMapper.selectList(null);
        return list;
    }
}
